//
//  SaveViewController.m
//  OpenEyes
//
//  Created by dlios on 15/9/21.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "SaveViewController.h"

@interface SaveViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic ,retain) UITableView *tableview;
@end

@implementation SaveViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.tableview =[[UITableView alloc]initWithFrame:self.view.frame style:UITableViewStylePlain];
    [self.tableview setDataSource:self];
    [self.tableview setDelegate:self];
    [self.view  addSubview:self.tableview];
    
    self.view.backgroundColor =[UIColor cyanColor];
    
 
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return [[DataBase shareDataBaseHandle]selectModel].count;
}


-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 55.0;
}


-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString * cellId  = @"cell";
    UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellId];
    if (cell == NO) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
    }
    return cell;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
